<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 *
*/
class MY_Controller extends CI_Controller{
	function __construct()
	{
		parent::__construct();
		// Init data
		$data = array();
		//Load helper
		$this->load->helper('url');
		$this->load->helper('html');

		// Load library template
		$this->load->library('template');
		// Set template
		$this->template->set_template('admin');

		// Add DocType
		$this->template->add_doctype();
			
		// Add meta
		$this->template->add_meta('viewport','width=device-width; initial-scale=1.0; maximum-scale=1;');
		$this->template->add_meta('apple-mobile-web-app-capable','yes');
		$this->template->add_meta('apple-mobile-web-app-status-bar-style','black-translucent');
			
		// Add title
		//$this->template->add_title('Quản lý trang VTV-Thời tiết');

		// Add CSS and JS
		$this->template->add_css('public/admin/css/all.css');
		$this->template->add_css('public/admin/css/theme/switcher.css','link','screen');
		$this->template->add_css('public/admin/css/theme/switcher1.php?default=switcher.css','link','screen');
		$this->template->add_css('public/admin/css/theme/switcher2.php?default=switcher.css','link','screen');
		$this->template->add_css('public/admin/css/theme/switcher3.php?default=switcher.css','link','screen');
		$this->template->add_css('public/admin/css/theme/switcher4.php?default=switcher.css','link','screen');

		$this->template->add_js('public/jwplayer/jwplayer.js');
		$this->template->add_js('public/admin/js/jquery.min.js');
		$this->template->add_js('public/admin/js/jquery-ui.min.js');
		$this->template->add_js('public/admin/js/plugins.js');
		$this->template->add_js('public/admin/js/fancybox/jquery.fancybox-1.3.4.js');
		$this->template->add_js('public/admin/js/quicksand/jquery.quicksand.js');
		$this->template->add_js('public/admin/js/quicksand/custom_sorter.js');
		$this->template->add_js('public/admin/js/quicksand/dash_sorter.js');
		$this->template->add_js('public/admin/js/quicksand/jquery-css-transform.js');
		$this->template->add_js('public/admin/js/quicksand/jquery-animate-css-rotate-scale.js');
		$this->template->add_js('public/admin/js/jqueryFileTree/jqueryFileTree.js');
		$this->template->add_js('public/admin/js/DataTables/jquery.dataTables.js');
		$this->template->add_js('public/admin/js/slidernav/slidernav.js');

		$this->template->add_js('public/admin/js/tinymce/jscripts/tiny_mce/tiny_mce.js');
		$this->template->add_js('public/admin/js/adminica/adminica_ui.js');

		$data_user_box['level_user'] = 'Administrator';
		$data_user_box['name_user'] = 'Trương Nhật';
		$data_user_box['avatar'] = 'public/admin/images/profile.jpg';

		$data_menu['data_menu'] = array(
				"<a href='#'>".img('public/admin/images/icons/small/white/laptop.png')."Tin tức</a>" => array(
						"<a href='#'>Danh sách tin bài</a>",
						"<a href='#'>Thêm tin bài</a>",
				),
				"<a href='#'>".img('public/admin/images/icons/small/grey/frames.png')."Video</a>" => array(
						"<a href='#'>Danh sách video</a>",
						"<a href='#'>Thêm video</a>",
				),
				"<a href='#'>".img('public/admin/images/icons/small/grey/coverflow.png')."Chuyên mục</a>" => array(
						"<a href='#'>Danh sách chuyên mục</a>",
						"<a href='#'>Thêm chuyên mục</a>",
				),
				"<a href='#'>".img('public/admin/images/icons/small/grey/create%20write.png')."Menu</a>" => array(
						"<a href='#'>Danh sách video</a>",
						"<a href='#'>Thêm video</a>",
				),
				"<a href='#'>".img('public/admin/images/icons/small/grey/images.png')."Thống kê</a>" => array(
						"<a href='#'>Thống kê video</a>",
						"<a href='#'>Thống kê tin bài</a>",
				),
				"<a href='#'>".img('public/admin/images/icons/small/grey/blocks%20images.png')."Người dùng</a>" => array(
						"<a href='#'>Danh sách người dùng</a>",
						"<a href='#'>Thêm người dùng</a>",
				),
				"<a href='#'>".img('public/admin/images/icons/small/grey/Folder.png')."Logs</a>" => array(
						"<a href='#'>Logs người dùng</a>",
						"<a href='#'>Logs #</a>",
				),
				"<a href='#'>".img('public/admin/images/icons/small/grey/Users.png')."Contacts</a>",
				"<a href='#'>".img('public/admin/images/icons/small/grey/Locked%202.png')."Logout</a>",
		);

		$data_side_link['side_links'] = array(
				0 => array(
						'link' => '#',
						'name_link' => 'Expert Forum'
				),
				1 => array(
						'link' => '#',
						'name_link' => 'Product Wiki'
				),
				2 => array(
						'link' => '#',
						'name_link' => 'Latest Company News'
				),
		);
		
		$data_accordion['data_accordion'] = array(
				"<a href='' class='top_level'>".img('public/admin/images/icons/small/grey/home.png')."Home</a>" => array(
						"<a href='#'>Activity</a>",
						"<a href='#'>Activity</a>",
				),
				"<a href='#' class='top_level'>".img('public/admin/images/icons/small/grey/mail.png')."Mailbox</a>" => array(
						"<a href='#'>Activity</a>",
						"<a href='#'>Activity</a>",
				),
				"<a href='#' class='top_level'>".img('public/admin/images/icons/small/grey/documents.png')."Documents</a>" => array(
						"<a href='#'>Activity</a>",
						"<a href='#'>Activity</a>",
				),
				"<a href='#' class='top_level'>".img('public/admin/images/icons/small/grey/users.png')."Members</a>" => array(
						"<a href='#'>Activity</a>",
						"<a href='#'>Activity</a>",
				),
				"<a href='#' class='top_level'>".img('public/admin/images/icons/small/grey/graph.png')."Statistics</a>" => array(
						"<a href='#'>Activity</a>",
						"<a href='#'>Activity</a>",
				),
				"<a href='#' class='top_level'>".img('public/admin/images/icons/small/grey/cog%202.png')."Settings</a>" => array(
						"<a href='#'>Activity</a>",
						"<a href='#'>Activity</a>",
				),				
		);


		// Parse data into view
		$this->template->parse_view('user_box','admin/block/user_box',$data_user_box);
		$this->template->parse_view('accordion','admin/block/accordion',$data_accordion);
		$this->template->parse_view('search_side','admin/block/search_side',$data);
		$this->template->parse_view('calendar','admin/block/calendar',$data);
		$this->template->parse_view('side_links','admin/block/side_links',$data_side_link);
		$this->template->parse_view('nav_top','admin/block/nav_top',$data_menu);
		$this->template->parse_view('bottom','admin/block/bottom',$data);
	}
	public function index()
	{
		$this->load->view('welcome_message');
	}
}